package fr.ants.model.stats;

import java.util.LinkedList;
import java.util.Queue;

/**
 * Statistics gathered during a whole simulation.
 *
 * @author Vianney DUPOY DE GUITARD
 */
public class SimulatorStatistics {

	/** Number of nests at start. */
	private int initialNestCount = 0;

	/** Current cycle. */
	private CycleStatistic currentCycle;

	/** List of cycle statistics. */
	private Queue<CycleStatistic> cycleStats = new LinkedList<>();

	/**
	 * @return the initialNestCount
	 */
	public int getInitialNestCount() {
		return initialNestCount;
	}

	/**
	 * @param initialNestCount the initialNestCount to set
	 */
	public void setInitialNestCount(int initialNestCount) {
		this.initialNestCount = initialNestCount;
	}

	/**
	 * @return the cycle count.
	 */
	public int getCycleCount() {
		return cycleStats.size();
	}

	/**
	 * @return the cycleStats
	 */
	public Queue<CycleStatistic> getCycleStats() {
		return cycleStats;
	}

	/**
	 * Starts a new cycle.
	 * @return the new cycle.
	 */
	public CycleStatistic newCycle() {
		currentCycle = new CycleStatistic();
		cycleStats.add(currentCycle);
		return currentCycle;
	}
}
